module.exports = {
  mode: 'production',
  target: 'web',
  entry: './src/main.mjs',
  output: {
    path: __dirname,
    filename: 'workbench.js',
  },
  module: {
    rules: [
      {
        test: /\.(?:js|mjs|cjs)$/,
        exclude: /node_modules/,
        use: {
          loader: 'babel-loader',
          options: {
            presets: [
              ['@babel/preset-env', { targets: 'defaults' }],
            ],
          },
        },
      },
    ],
  },
}
